package com.stackexchange.webapis.enums
{
	import com.nodename.utils.Enumeration;

	public class StateType
	{
		Enumeration.registerClass(StateType);
		
		[Enum] public static const NORMAL:StateType = _();
		[Enum] public static const CLOSED_BETA:StateType = _();
		[Enum] public static const OPEN_BETA:StateType = _();
		[Enum] public static const LINKED_META:StateType = _();
		
		protected static const LOCK:Object = {};
		private static function _():StateType
		{
			return new StateType(LOCK);
		}
		
		public function StateType(lock:Object)
		{
			if (lock != LOCK)
				throw new Error("illegal constructor access");
		}
		
		public function toString():String
		{
			return Enumeration.nameOf(this);
		}
	}
}